﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace BookOnline.Data
{
    public class BookAuthor
    {
       private string _BAID;
       private string _BookID;
       private string _AuthorID;

       public string BAID { get { return _BAID; } set { _BAID = value; } }
       public string BookID { get { return _BookID; } set { _BookID = value; } }
       public string AuthorID { get { return _AuthorID; } set { _AuthorID = value; } }

       public BookAuthor BAIDataReader(IDataReader dr)
       {
           BookAuthor obj = new BookAuthor();
           obj.BAID = (dr["BAID"] is DBNull) ? string.Empty : dr["BAID"].ToString();
           obj.BookID = (dr["BookID"] is DBNull) ? string.Empty : dr["BookID"].ToString();
           obj.AuthorID = (dr["AuthorID"] is DBNull) ? string.Empty : dr["AuthorID"].ToString();
           return obj;
       }
    }
}
